package com.etc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.etc.dao.BlogComnentMapper;
import com.etc.entity.BlogComnent;
import com.etc.entity.UBB;
import com.etc.service.BlogComnentService;

@Service
public class BlogComnentServiceImpl implements BlogComnentService {

	@Resource
	private BlogComnentMapper blogComnentMapper;

	@Override
	public List<BlogComnent> getBlogComnentByBid(int bid) {
		// TODO Auto-generated method stub
		return blogComnentMapper.getBlogComnentByBid(bid);
	}

	@Override
	public List<BlogComnent> getBlogComnent() {
		// TODO Auto-generated method stub
		return blogComnentMapper.getBlogComnent();
	}

	@Override
	public List<UBB> getUBB(int bid) {
		// TODO Auto-generated method stub
		return blogComnentMapper.getUBB(bid);
	}

	@Override
	public boolean addcomment(BlogComnent bc) {
		
		return blogComnentMapper.insertSelective(bc)>0;
	}

}
